<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border="1" width="80%">
		<tr>
			<th>ID</th>
			<th>用户名</th>
			<th>密码</th>
		</tr>
		<c:forEach items="${pb.list }" var="pl">
			<tr>
				<td>${pl.id }</td>
				<td>${pl.username }</td>
				<td>${pl.password }</td>
			</tr>
		</c:forEach>
		<tr>
			<td>共有${pb.totalRecord }记录，共有${pb.totalPage }页</td>
			<td>
			<c:if test="${pb.pageNum == 1 }">
					首页
			</c:if>
			<c:if test="${pb.pageNum != 1 }">
					<a href="<%=request.getContextPath()%>/userServlet?pageNum=1">首页</a>
			</c:if>
			 <c:if test="${pb.pageNum == pb.totalPage }">
					尾页
			</c:if>
			<c:if test="${pb.pageNum != pb.totalPage }">
					 <a href="<%=request.getContextPath() %>/userServlet?pageNum=${pb.totalPage }">尾页</a>
			</c:if>
			</td>
			<td>
				<c:if test="${pb.pageNum == 1 }">
					上一页
				</c:if> 
				<c:if test="${pb.pageNum != 1 }">
					<a href="<%=request.getContextPath() %>/userServlet?pageNum=${pb.pageNum-1 }">上一页</a>
				</c:if> 
				
				<c:if test="${pb.pageNum == pb.totalPage }">
					下一页
				</c:if> 
				<c:if test="${pb.pageNum != pb.totalPage }">
					<a href="<%=request.getContextPath() %>/userServlet?pageNum=${pb.pageNum+1 }">下一页</a>
				</c:if> 
		</tr>
	</table>
</body>
</html>